<%@ include file="../common.jsp" %>

<script type="text/javascript">
	loadCategAndSubCategForReports();
</script>


<div align="center">
	<table class="bodyTable">
		<tr class="formSpacingRow"><td></td></tr>
		<tr align="right" style="width: 100%;" >
			<td >
				<table class="filtersTable zeroBorder" style="width: 100%;">
					<tr class="tableChildHeaderColor" align="left" style="width: 100%;">
						<td>
							<table style="width: 100%;" class="zeroBorder">
								<tr>
									<td style="width: 80%;">
										<table class="zeroBorder">
											<tr>
												<td class="spacingColumnWidthLess"></td>
												<td align="left">
													<img alt="" src="./customTheme/Icons/BlueLotus_DMS_icons-11.png">
												</td>
												<td class="spacingColumnWidthLess"></td>
												<td style="vertical-align: middle;"><span class="tableMainHeaderFont"> SEARCH FOR VAULT DETAILS </span></td>
											</tr>
										</table>
									</td>
									<td align="right" style="width: 20%;" >
										<table class="zeroBorder">
											<tr id="toggleDiv" class="displayNone" style="background-color: #000000; border-color: #000000; border-style: solid;">
												<td class="togglerFont errorMessage">
													MODIFY SEARCH
												</td>
												<td>
													<img alt="" src="./customTheme/Icons/BlueLotus_DMS_icons-43.png" onclick="javascript:showDiv('#vaultReportsFilter','#toggleDiv')">
												</td>
											</tr>
										</table>
									</td>
								</tr>
							</table>
						</td>
					</tr>
					<tr class="formSpacingRow formBlockColor"><td></td></tr>
					<tr align="center">
						<td>
							<div id="vaultReportsFilter" class="formBlockColor">
								<form:form commandName="detailsForm" id="vaultDetails">
								<table style="width: 100%;">
									<tr>
										<td class="formLabel">Business Unit (Custodian)</td>
										<td class="spacingColumnWidthLess"></td>
										<td align="left" class="formField"><form:select path="custodianLocId" id="docLocId" onchange="loadDepttForBUForReports(this.id,'docDepttId');">
							 					<form:option value="0">ALL</form:option>
									 				<c:forEach items="${businessUnitMap}" var="businessUnitMap">
									 					<form:option value="${businessUnitMap.key}">${businessUnitMap.value}</form:option>
									 				</c:forEach>
									 			</form:select>
							 			</td>
										<td class="spacingColumnWidthMedium"></td>
										<td class="formLabel">Type</td>
										<td class="spacingColumnWidthLess"></td>
										<td align="left" class="formField">
											<form:select path="docTypeId" id="docTypeId">
								 					<form:option value="0">ALL</form:option>
								 				<c:forEach items="${docTypeMap}" var="docTypeMap">
								 					<form:option value="${docTypeMap.value.dtId}">${docTypeMap.value.dtName}</form:option>
								 				</c:forEach>
								 			 </form:select>
										</td>
										<td class="spacingColumnWidthLess"></td>
									</tr>
									<tr class="formSpacingRow"><td></td> </tr>
									<tr>
										<td class="formLabel">Department (Custodian)</td>
										<td class="spacingColumnWidthLess"></td>
										<td align="left" class="formField">
											 <form:select path="custodianDepttId" id="docDepttId">
								 			 	<form:option value="0">ALL</form:option>
								 			 </form:select></td>
										<td class="spacingColumnWidthMedium"></td>
										<td class="formLabel">Category</td>
										<td class="spacingColumnWidthLess"></td>
										<td align="left" class="formField">
											 <form:select path="docCategoryId" id="docCategoryId">
								 			 	<form:option value="0">ALL</form:option>
								 			 </form:select>
										</td>
										<td class="spacingColumnWidthLess"></td>
									</tr>
									<tr class="formSpacingRow"><td></td> </tr>
									<tr>
										<td class="formLabel">Business Unit (Document)</td>
										<td class="spacingColumnWidthLess"></td>
										<td align="left" class="formField">
											 <form:select path="docLocId" id="docLoccationId" onchange="loadDepttForBUForVaultBU(this.id,'docDepartmentId');">
								 					<form:option value="0">ALL</form:option>
								 				<c:forEach items="${businessUnitMap}" var="businessUnitMap">
								 					<form:option value="${businessUnitMap.key}">${businessUnitMap.value}</form:option>
								 				</c:forEach>
								 			 </form:select>
									 	</td>
										<td class="spacingColumnWidthMedium"></td>
										<td class="formLabel">Sub-Category</td>
										<td class="spacingColumnWidthLess"></td>
										<td align="left" class="formField">
											<form:select path="docSubCategoryId" id="docSubCategoryId"> 
								 			 	<form:option value="0">ALL</form:option>
								 			 </form:select>
										</td>
										<td class="spacingColumnWidthLess"></td>
									</tr>
									<tr class="formSpacingRow"><td></td> </tr>
									<tr>
										<td class="formLabel">Department (Document)</td>
										<td class="spacingColumnWidthLess"></td>
										<td align="left" class="formField">
											<form:select path="docDepttId" id="docDepartmentId">
								 			 	<form:option value="0">ALL</form:option>
								 			</form:select>
								 		</td>
										<td class="spacingColumnWidthMedium"></td>
										<td class="formLabel"></td>
										<td class="spacingColumnWidthLess"></td>
										<td align="right" class="formField" style=" padding-right: 10px !important;">
											<input style="width: 150px;" class="formButton ui-corner-all" type="button" value="GENERATE REPORT" onclick="loadVaultReportsTable();">
										</td>
										<td class="spacingColumnWidthLess"></td>
									</tr>
									<tr>
										<td colspan="6"></td>
										<td align="right">
											<img alt="" src="./customTheme/Icons/BlueLotus_DMS_icons-43.png" class="displayBlock" onclick="javascript:hideDiv('#vaultReportsFilter','#toggleDiv')">
										</td> 
									</tr>
								</table>
								</form:form>
							</div>
						</td>
					</tr>
				</table>
			</td>
		</tr>
		<tr class="formSpacingRow"><td></td> </tr>
		<tr class="formSpacingRow"><td></td> </tr>
		<tr>
			<td>
				<div id="vaultReports"></div>
			</td>
		</tr>
	</table>
</div>